Skip to content

delete blacklisted attachments from message and replace with webhook #520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 24, 2025

Conversation

ayyhimself
Copy link
Contributor

new crazy amazing feature where if someone sends a message with a forbidden attachment then that attachment is removed and the whole message is replaced as a webhook with only the good attachments
works server wide
config in guild config

@ayyhimself ayyhimself requested a review from a team as a code owner July 11, 2025 18:31
Copy link
Member

@danthe1st danthe1st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the changes I wrote in the review comments.

Also, please use a proper/professional commit message. You can change the commit message of your existing commit using git commit --amend (optionally with -m <message>) and then force-pushing to your branch with git push --force-with-lease.

@danthe1st
Copy link
Member

Please also fix the checkstyle errors. We use tabs for indentation.

@ayyhimself ayyhimself force-pushed the ayys-crazy-attachment-remover branch from 699283b to a2b3d33 Compare August 3, 2025 15:07
Copy link
Member

@danthe1st danthe1st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the comments.

Other things to eventually convert to a filter:

  • AutoMod (please do this in this PR)
  • suggestions (can be another PR)
  • code formatting in help channel (can be in another PR)

It might als be a good idea to add an overload to WebhookUtil.replaceMessage without embeds/attachments to make the code simpler instead of having to add a null argument wherever calling it.

@ayyhimself ayyhimself force-pushed the ayys-crazy-attachment-remover branch from a2b3d33 to 2d539ab Compare August 16, 2025 14:43
@ayyhimself
Copy link
Contributor Author

ayyhimself commented Aug 16, 2025

Copy link
Member

@danthe1st danthe1st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also fix the CI failures.

@ayyhimself ayyhimself force-pushed the ayys-crazy-attachment-remover branch from 2d539ab to 1cb7604 Compare August 16, 2025 17:10
Copy link
Member

@danthe1st danthe1st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please still fix the CI failures.

@ayyhimself ayyhimself force-pushed the ayys-crazy-attachment-remover branch from 1cb7604 to 1bc0ebd Compare August 19, 2025 15:38
@ayyhimself ayyhimself force-pushed the ayys-crazy-attachment-remover branch from 1bc0ebd to 5ab7962 Compare August 22, 2025 20:36
Copy link
Member

@danthe1st danthe1st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testing results

@danthe1st danthe1st merged commit cf93f9e into Java-Discord:main Aug 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants